home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / Applications / directtex Pro 2.0 / DirectTeX.5 / Installer-Files / Tools-MPW / Tools-MPW folder / MakeMissing < prev    next >
Encoding:
Text File  |  1995-03-27  |  1.8 KB  |  76 lines  |  [TEXT/MPS ]

  1. # This script file is part of the DirectTeX :-) package.
  2. #
  3. # (c) 1991-94 by Wilfried Ricken
  4. #                Hagenaustraße 41
  5. #                45138 Essen
  6. #                Germany
  7.  
  8. Begin
  9.     Set Echo 0
  10.     Set Exit 0
  11.  
  12.     If {Status} != 0 || "`Catenate "{dt_MissingFonts}"`" == ""
  13.         Alert "There are no missing fonts to create. You may check your document for missing fonts and call me again."
  14.         Exit 0
  15.     End
  16.  
  17.     If {#} == 1 && "{1}" == "-show"
  18.         Open "{dt_MissingFonts}"
  19.         Find • "{dt_MissingFonts}"
  20.         Exit 0
  21.     End
  22.  
  23.     If {#} == 1 && "{1}" == "-make"
  24.         Set FontCount 0
  25.         Set ErrCount 0
  26.         Set dt_BatchMode On
  27.         Export dt_BatchMode
  28.  
  29.         Target "{dt_MissingFonts}"
  30.         Open "{dt_MissingFonts}"
  31.         Find • "{dt_MissingFonts}"
  32.         BeginSession
  33.  
  34.         SearchPath dt_FormatFiles Plain.base ∑ Dev:Null
  35.  
  36.         If {Status} != 0
  37.             MFToPK -i Plain ≥≥ "{dt_SessionLog}"
  38.         End
  39.  
  40.         Echo "### `Date -t` ----- Processing ∂"{dt_MissingFonts}∂"." >> "{dt_SessionLog}"
  41.  
  42.         Loop
  43.             Find /[¬∂n]+/ "{dt_MissingFonts}"
  44.             Break If {Status} != 0
  45.  
  46.             Echo -n "### Executing command '" >> "{dt_SessionLog}"
  47.             Catenate "{dt_MissingFonts}.§" >> "{dt_SessionLog}"
  48.             Echo "'." >> "{dt_SessionLog}"
  49.             Execute "{dt_MissingFonts}.§" ≥≥ "{dt_SessionLog}"
  50.             Set ErrNum {Status}
  51.             Echo "### Last command returned with Status = {ErrNum}." >> "{dt_SessionLog}"
  52.  
  53.             If {ErrNum} < 2
  54.                 Find `Position -l "{dt_MissingFonts}"` "{dt_MissingFonts}"
  55.                 Clear § "{dt_MissingFonts}"
  56.                 Save "{dt_MissingFonts}"
  57.                 Evaluate FontCount += 1
  58.             Else
  59.                 Evaluate ErrCount += 1
  60.             End
  61.         End
  62.  
  63.         Find • "{dt_MissingFonts}"
  64.         Close -y "{dt_MissingFonts}"
  65.  
  66.         If {ErrCount} ≠ 0
  67.             Echo "### Use 'Show Missing Fonts' to see all bad commands." >> "{dt_SessionLog}"
  68.         End
  69.  
  70.         Echo "### `Date -t` ----- Finished. Fonts created: {FontCount}. Errors: {ErrCount}." >> "{dt_SessionLog}"
  71.         EndSession
  72.     End
  73.  
  74.     Exit 0
  75. End ∑ Dev:Null
  76.